{% extends "base.html" %}

{% load avatar_tags %}

{% block title %}
	Your Avatars
{% endblock %} 

{% block submenu %}
	{% include "myprofile/submenu.html" %}
{% endblock %}   

{% block content %}

	<h1> Your Primary Avatar </h1>

	<table>
	<tr>
		<td style="vertical-align: middle;">
		    {% avatar user %}
		</td>
	
		<td style="vertical-align: middle;">
			<a href="{% url avatar_add %}" style="text-decoration:none;"><p class="edit"> Add a new avatar </p></a>
			<a href="{% url avatar_delete %}" style="text-decoration:none;"><p class="edit"> Delete avatar </p></a>
		</td>
	</tr>		
	</table>	
			
    {% if avatars %}
		<h2> Change your primary avatar: </h2>

		<form action="{{ request.path_info }}" method="post">
			{% csrf_token %}
	
			<div style="list-style:none;">
           {{ primary_avatar_form.as_ul }}
		   </div>
	
		    <button type="submit"> Save </button>
		</form> 
    {% endif %}

{% endblock %}